This is a set of macros for measuring the area of various regions in the corpus collosum in MRI scans. It assumes that the scans are 256x256, that you are using a 19" monitor, that the Undo buffer is set to 600K, and that you have a lot of RAM.
This is the procedure:
1) Open or activate the scan to be analyzed and type Z.
2) Draw a base line using the line tool.
3) Draw perpendicular lines by typing S or R.
4) Draw a perpendicular line at an arbitrary location by clicking
on the base line with the line tool and typing A.
5) Outline the corpus collosum.
6) Threshold by typing B.
7) Measure the areas by clicking inside each region with the wand.
8) Revert to grayscale by typing G. (Optional)
9) Dispose of the 768x768 working window by typing D.
}
var {Global variables}
WindowNum:integer;
x1,y1,x2,y2,LineWidth:integer;
size,angle,dx,dy,pi,theta:real;
width,height,dx,dy,i:integer;
macro 'Zoom Window [Z]';
var
top,left,width,height:integer;
begin
RequiresVersion(1.50);
if UndoBufferSize<(768*768) then begin
PutMessage('Use Preferences(Options Menu) to increase the Undo buffer size to at least 600K.');
exit;
end;
GetPicSize(width,height);
if width>600 then begin
PutMessage('Window has already been zoomed.');
exit;
end;
KillRoi;
SetScale(1,'mm'); {Assume 1 pixel/mm}
WindowNum:=PicNumber;
SetScaling('Nearest; New Window');
ScaleAndRotate(3,3,0);
ChangeValues(254,255,253); {Reserve 254-255(black) for graphics}